#include <cstdio>
#include <vector>
#include <iostream>
#include <cstring>
#include <algorithm>
using namespace std;
#define MAXN 100005
#define MOD 1000000007
#define sz(x) (int)(x.size())
#define LL long long
int N, a[MAXN];

vector<int> prime[10001];

vector<int> p[10001];

void init() {
	for (int i = 1; i <= 10000; i ++) {
		for (int j = 1; j * j <= i; j ++) {
			if (i % j) continue;
			if (j * j == i) {
				prime[i].push_back(j);
			} else {
				prime[i].push_back(j);
				prime[i].push_back(i / j);
			}
		}
	}
}

void work() {
	for (int i = 1; i <= 10000; i ++) {
		p[i].clear();
	}
	for (int i = 1; i <= N; i ++) {
		scanf("%d", &a[i]);
		for (int j = 0; j < sz(prime[a[i]]); j ++) {
			int v = prime[a[i]][j];
			p[v].push_back(i);
		}
	}
	for (int i = 1; i <= N; i ++) {

	}
}

int main() {
	init();
	while (scanf("%d", &N) != EOF) {
		work();
	}
	return 0;
}
